package com.lujieni.springbootmapconstructor.mapper;

import com.lujieni.springbootmapconstructor.dto.OuterObjectDTO;
import com.lujieni.springbootmapconstructor.vo.OuterObjectVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface OuterInnerConvert {

    OuterInnerConvert INSTANCE = Mappers.getMapper(OuterInnerConvert.class);

    /**
     * 嵌套对象的转换MapConstruct也可以转
     * @param list
     * @return
     */
    List<OuterObjectVO> convert(List<OuterObjectDTO> list);

    @Mapping(source = "list", target = "fuck")
    OuterObjectVO convert2(OuterObjectDTO dto);

}
